SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 54843: PROC EXPAND might not honor the OBSERVED= option if it is specified in the PROC statement

DetailsAboutRate It

If the OBSERVED= option is specified in the PROC EXPAND statement and no CONVERT statement is included in the PROC EXPAND step, then the following occurs:

  • The specified OBSERVED=value is ignored, and
  • The default OBSERVED=BEGINNING attribute is applied to all numeric variables on the DATA= data set
This can cause the results returned by the procedure to be different than expected, because the observation characteristics of the data specified in the OBSERVED= option are not used.

For example, suppose you have a data set, A, with a large number of variables that represent quarterly averages, and you want to convert the values of all these numeric variables to monthly averages. If you specify:

proc expand data=a out=b from=qtr to=month observed=average; id date; run;

then the returned results are incorrect, because the OBSERVED=AVERAGE attribute is not honored and all input and output observations are treated as beginning-of-period values.

To circumvent the problem, add a CONVERT statement to the PROC EXPAND step and either list the variable names to be processed by the procedure or use the _NUMERIC_ keyword. The above example code can be modified as follows so that the OBSERVED=AVERAGE attribute is honored:

proc expand data=a out=b from=qtr to=month observed=average; id date; convert _numeric_; run;


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ETSz/OS9.2114.19.2 TS2M09.4 TS1M3
Microsoft® Windows® for 64-Bit Itanium-based Systems9.219.2 TS2M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.219.2 TS2M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.219.2 TS2M0
Microsoft Windows XP 64-bit Edition9.219.2 TS2M0
Microsoft® Windows® for x649.2114.19.2 TS2M09.4 TS1M3
Microsoft Windows Server 2003 Datacenter Edition9.219.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.219.2 TS2M0
Microsoft Windows Server 2003 Standard Edition9.219.2 TS2M0
Microsoft Windows Server 2003 for x649.219.2 TS2M0
Microsoft Windows Server 2008 R29.2114.19.2 TS2M09.4 TS1M3
Microsoft Windows Server 2008 for x649.2114.19.2 TS2M09.4 TS1M3
Microsoft Windows XP Professional9.219.2 TS2M0
Windows Vista9.219.2 TS2M0
Windows Vista for x649.219.2 TS2M0
64-bit Enabled AIX9.2114.19.2 TS2M09.4 TS1M3
64-bit Enabled HP-UX9.2114.19.2 TS2M09.4 TS1M3
64-bit Enabled Solaris9.2114.19.2 TS2M09.4 TS1M3
HP-UX IPF9.2114.19.2 TS2M09.4 TS1M3
Linux9.2114.19.2 TS2M09.4 TS1M3
Linux for x649.2114.19.2 TS2M09.4 TS1M3
OpenVMS on HP Integrity9.2114.19.2 TS2M09.4 TS1M3
Solaris for x649.2114.19.2 TS2M09.4 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.